package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.form.VehiClesInfoFrom;
import cn.huiyunche.base.service.model.BStowageModel;
import cn.huiyunche.base.service.model.SShippingFee;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.Result;
import cn.huiyunche.base.service.vo.SOrderFeeDetailVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 运距系数
 * 距离浮动因数
 *
 * @author Administrator
 */
public interface SShippingFeeService {

    /**
     * 查询运距系数 距离浮动因数列表
     *
     * @param page
     * @param sShippingFee
     * @return
     */
    Map<String, Object> list(PageVo page, SShippingFee sShippingFee);

    /**
     * 更新运距系数
     *
     * @param sShippingFee
     * @return
     */
    Result<String> updateShippingRate(SShippingFee sShippingFee);

    /**
     * 更新距离浮动因数
     *
     * @param sShippingFee
     * @return
     */
    Result<String> updateShippingSubsidy(SShippingFee sShippingFee);

    /**
     * @param distance 运距
     * @param fees     费用因子
     * @Title: calculateShippingFee
     * @Description: 计算运距的运输费
     * @return: BigDecimal
     */
    BigDecimal queryBaseShippingFee(final BigDecimal distance, List<SShippingFee> fees);

    /**
     * @param distance 运距
     * @Title: getList
     * @Description: 获取所有费用因子
     * @return: List<SShippingFee>
     */
    List<SShippingFee> getList(BigDecimal distance);

    /**
     * @param coefficient  物流产品系数
     * @param baseFee      基础运价
     * @param vehicles     车辆信息
     * @param stowageModel 匹配客户订单的配置模型信息
     * @Title: queryVehiclesShippingFee
     * @Description: 计算车辆总运费
     * @return: SOrderFeeDetailVo
     */
    SOrderFeeDetailVo queryVehiclesShippingFee(BigDecimal coefficient, BigDecimal baseFee,
                                               List<VehiClesInfoFrom> vehicles, BStowageModel stowageModel);
}
